home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 1 / Cream of the Crop 1.iso / UTILITY / DO1002.ARJ / DIR.SCR < prev    next >
Text File  |  1991-12-28  |  3KB  |  91 lines

  1. .pg wi full clr
  2.     »cy«COMMAND NAME»gray«: »%t« Directory »ye«
  3.  
  4.     /DIR {pattern} {$[F|P|E]}
  5. /cw
  6.     Display a directory of files matching {pattern}.
  7.     The default »cy«{pattern}»#« is all files ("»wh«*.*»#«").
  8.  
  9.     If a file is selected by »+bo«highlighting»#« it and pressing »bo«<enter>»#«,
  10.     information about the file is returned in the variable
  11.     »ye«FILENAME»#« based on the "»cy«$»#«" token, if entered.  The following
  12.     information is returned:
  13.  
  14.         ~036»ye«P »#«or »ye«none    »gr«Full pathname»#«
  15.         ~036»ye«F»gr«            Full filename (no path)»#«
  16.         ~036»ye«E»gr«            Extension only
  17. »#«
  18.     The "»cy«$»#«" indicators can also be used in any command or display
  19.     line that includes »wh«variable expansion»#«.
  20. .pg clr
  21.     The following are some examples of various uses of the »%t«/DIR»#«
  22.     command and the "»cy«$»#«" variables.  Press the »wh«Up/Down Arrow keys»#« or
  23.     »wh«page up/down»#« keys to see more files or pisition the cursor.  If
  24.     »bo«<enter>»#« is pressed while the cursor is on a »ye«directory entry»#«, the
  25.     display will change to that directory.
  26. .pg clr
  27. The following command will display all files in the current directory.
  28. Press »bo«<esc>»#« when you are finished viewing the files.
  29.  
  30. |/DIR
  31. .pg clr
  32. This command will display all files with an extension of "»wh«BAT»#«"
  33. in the root directory.
  34. Press »bo«<esc>»#« when you are finished viewing the files.
  35.  
  36. |/DIR "\*.BAT"
  37. .pg clr
  38. The »cy«{pattern}»#« allows variable substitution.  For example, in which
  39. directory are all your executable files kept (be sure to include the
  40. drive)?
  41.  
  42. /SET default C:\DOS
  43. /GETS dir default "»ye«Which Directory»+re«?»#«"
  44.  
  45. Now that we have this information, we'll substitute it in a »%t«/DIR»#«
  46. command and display all the "»ye«EXE»#«" files there.  Press »bo«<esc>»#« when
  47. you're through viewing the directory.
  48.  
  49. |/DIR %dir\*.EXE
  50. .pg clr
  51.  
  52. Pressing the »bo«<enter>»#« key when the cursor is on a file will return
  53. the requested information in the variable »ye«FILENAME»#«.  Select any file
  54. in the directory by highlighting it and pressing »bo«<enter>»#«.
  55. .pg
  56. /dir
  57. Here is the line that will display the pathname (the default):
  58.  
  59. |The complete path name (»wh«%FILENAME»#«) was returned
  60.  
  61. .pg clr
  62.  
  63. But, you do not have to have a separate »%t«/DIR»#« command to display
  64. filenames or use them in commands.  Simply enter the "»ye«$»#«" variables
  65. "»ye«F»#«", "»ye«P»#«", "»ye«E»#«" in your display or command line.  You can follow this
  66. with a »cy«{pattern}»#« enclosed in parentheses ["»cy«()»#«"] to select only specific
  67. files.
  68.  
  69. Here are some examples.  We'll show you to command or line before
  70. executing it.
  71.  
  72. Select a file from each and press »bo«<enter>»#«.
  73.  
  74. .pg clr
  75.  
  76. First, let's use the »wh«path variable»#« in a »%t«/LIST»#« command
  77.  
  78. |/LIST $P
  79. .clr
  80.  
  81. Next, let's display a »wh«filename»#« in a line:
  82.  
  83. |»cy«The filename is»gray«:»wh«  $F»#«
  84.  
  85. .pg clr
  86. Now, let's display a »wh«extension»#« in a display line:
  87.  
  88. |»cy«The extension is»gray«:»wh« $E»#«
  89.  
  90. /ENDEXEC
  91.